package com.supostacks.domain.vo;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Setting;

import java.io.Serializable;

@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "resource_info")
@Setting(shards = 2, replicas = 2, refreshInterval = "2s", indexStoreType = "mmapfs")
public class ResourceInfoVo extends BaseVo implements Serializable {
    @Field(type = FieldType.Text)
    private String subject;
    @Field(type = FieldType.Text)
    private String content;

    private byte[] coverImage;
    private String type;
    private String url;
    private String getCount;

    private String categoryId;
    @Field(type = FieldType.Text)
    private String categoryName;

    private String status;
    private Boolean isList;
}
